<?php

namespace App\Http\Requests\Admin\Customer\PackCategory;

use App\Http\Requests\ApiRequest;

/**
 * @property array order_bys
 */
class PackCategoryIndexRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'order_bys'            => 'nullable|array',
            'order_bys.*.order_by' => 'required|string',
            'order_bys.*.sort'     => 'required|string|in:DESC,ASC',
        ];
    }
}
